package com.shejimoshi.Abstract_Color_Shape;

import com.shejimoshi.AbstaractFactoy.AbstractFactory;
import com.shejimoshi.Color_Demo.Color;
import com.shejimoshi.Shape_Demo.Shape;
import com.shejimoshi.Shape_Demo.impl.Circle;
import com.shejimoshi.Shape_Demo.impl.Rectangle;
import com.shejimoshi.Shape_Demo.impl.Square;


public class ShapeFactory extends AbstractFactory {
    @Override
    public Shape getShape(String shape) {
        if(shape == null)return  null;

        if(shape.equalsIgnoreCase("circle")){
            return new Circle();
        }else if(shape.equalsIgnoreCase("rectangel")){
            return new Rectangle();
        }else if(shape.equalsIgnoreCase("square")){
            return new Square();
        }

        return null;
    }

    @Override
    public Color getColor(String color) {
        return null;
    }
}
